import xhr from './xhr/';

/**
 * 对应后端涉及到用户认证的 API
 */
class HomeService {
  /**
   * @param  {Object} userData
   * @return {Promise}
   */
  queryInformations(callBack) {
    return xhr({
      //url: '/api/v3/queryInformationsController',
      url: '/api/information/queryInformation',
      type:1,
      body: {'type':'001'},
      mock:true,
      prevShow:callBack
    });
  }


  /**
   * @param  {Object} 资讯id
   * @return {Promise}
   * 判断该资讯是否已下架
   */
  checkNewsPubStatus(data) {
    return xhr({
      url: '/api/information/queryMsgType',
      body: data

    });
  }
}

// 实例化后再导出
export default new HomeService();
